import request from '@/utils/request'

// 获取教员详情
export function getTeacherDetailByTeacherId(teacherId) {
  return request({
    url: '/profile/profile/getTeacherDetailByTeacherId/' + teacherId,
    method: 'get'
  })
}

// 获取科目分类列表
export function getTeacherListByCategoryId(categoryId) {
  return request({
    url: '/profile/profile/getTeacherListByCategoryId/' + categoryId,
    method: 'get'
  })
}

// 获取推荐老师列表
export function getTeacherList() {
  return request({
    url: "/profile/profile/getTeacherList",
    method: "get",
  });
}



// 通过user_id获取教员联系方式
export function getTeacherPhone(userId) {
  return request({
    url: "/profile/profile/getTeacherPhone/" + userId,
    method: "get",
  });
}

// 查询教员信息列表
export function listProfile(query) {
  return request({
    url: '/profile/profile/list',
    method: 'get',
    params: query
  })
}

// 查询教员信息详细
export function getProfile(teacherId) {
  return request({
    url: '/profile/profile/' + teacherId,
    method: 'get'
  })
}

// 新增教员信息
export function addProfile(data) {
  return request({
    url: '/profile/profile',
    method: 'post',
    data: data
  })
}

// 修改教员信息
export function updateProfile(data) {
  return request({
    url: '/profile/profile',
    method: 'put',
    data: data
  })
}

// 删除教员信息
export function delProfile(teacherId) {
  return request({
    url: '/profile/profile/' + teacherId,
    method: 'delete'
  })
}
